#include<stdio.h>
int main(void)
{
	int n,p, c, d;
	printf("Please enter the purchase amount:\n");
	scanf("%d", &c);
	n = c / 100;
	d = 100;
	switch (n)
	{
	case 0:
		d = 100;
		break;
	case 1:
		d = 97;
		break;
	case 2:
	case 3:
	case 4:
		d = 95;
		break;
	case 5:
	case 6:
	case 7:
		d = 90; 
		break;
	case 8:
	case 9:
		d = 90;
		break;
	default:
		d = 80;
		break;
	}
		p = (c * d)/100;
	printf("Total price=%d\n", p);
	return 0;
}